# Maintainer: Florian Pritz <bluewind@xinu.at>

pkgname=perl-net-dns-resolver-mock
pkgver=1.20230216
pkgrel=1
pkgdesc='Mock a DNS Resolver object for testing'
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=(perl-net-dns)
makedepends=('perl>=5.6')
checkdepends=(perl-test-exception)
url=https://metacpan.org/release/Net-DNS-Resolver-Mock
source=("https://cpan.metacpan.org/authors/id/M/MB/MBRADSHAW/Net-DNS-Resolver-Mock-$pkgver.tar.gz")
md5sums=(d191b6b1eb40497024988f500fe65ed4)
sha512sums=(832fdae88ef915251bd71ebacd3223cd8adb269cbb2e9724c617b31cfa65c92471ce93273070143c629e0a3f3bda54bcd5d55ae78fd60eae6c929bb7da7e1290)
_ddir="Net-DNS-Resolver-Mock-$pkgver"

build()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  unset PERL5LIB PERL_MM_OPT
  /usr/bin/perl Makefile.PL
  make
)

check()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1
  unset PERL5LIB
  make test
)

package()
(
  cd "$srcdir/$_ddir"
  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
)

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
